#include "QROHost_P.h"

//RemoteRegistrySourceImp

RemoteRegistrySourceImp::RemoteRegistrySourceImp(QROHost::Private* parent):_P(parent),RemoteRegistrySource(parent->_Q)
{

}

int RemoteRegistrySourceImp::registerChannel(QVariant cookie){
    return _P->onRegisterChannel(cookie);
}

void RemoteRegistrySourceImp::unregisterChannel(int id){
    _P->onUnregisterChannel(id);
}

//RemoteInterfaceSourceImp

RemoteInterfaceSourceImp::RemoteInterfaceSourceImp(QROHost::Private* parent):RemoteInterfaceSimpleSource(parent->_Q){
    _P = parent;
}

QByteArray RemoteInterfaceSourceImp::initialUpdate(){
    return _P->onInitialUpdate(this);
}

void RemoteInterfaceSourceImp::serverCall(int id, int method, QVariantList param,int sync){
    _P->onServerCall(this,id,method,param,sync);
}

void RemoteInterfaceSourceImp::pushProperty(int id, int prop, QVariant value){
    _P->onPushProperty(this,id,prop,value);
}

void RemoteInterfaceSourceImp::pushParent(int target,int parent)
{
    _P->onPushParent(this,target,parent);
}

void RemoteInterfaceSourceImp::clientCallFinished(int synch, QVariant ret, bool success)
{
    _P->onClientCallReady(this,synch,ret,success);
}

bool RemoteInterfaceSourceImp::occupyObject(quint32 target)
{
    return _P->onOccupyObject(this,target);
}

bool RemoteInterfaceSourceImp::releaseObject()
{
    return _P->onReleaseObject(this);
}
